<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<header th:replace="admin/header::header-fragment"></header>
<body class="hold-transition sidebar-mini">
<style>
    .ui-jqgrid tr.jqgrow td {
        white-space: normal !important;
        height: auto;
        vertical-align: text-top;
        padding-top: 2px;
    }
</style>
<div class="wrapper">
    <!-- 引入页面头header-fragment -->
    <div th:replace="admin/header::header-nav"></div>
    <!-- 引入工具栏sidebar-fragment -->
    <div th:replace="admin/sidebar::sidebar-fragment(${path})"></div>
    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <div class="content-header">
            <div class="container-fluid">
            </div><!-- /.container-fluid -->
        </div>
        <!-- Main content -->
        <div class="content">
            <div class="container-fluid">
                <div class="card card-primary card-outline">
                    <div class="card-header">
                        <h3 class="card-title">文件管理</h3>
                    </div> <!-- /.card-body -->
                    <div class="card-body">
                        <div class="grid-btn">
                            <button class="btn btn-info" onclick="linkAdd()"><i
                                    class="fa fa-plus"></i>&nbsp;上传
                            </button>
<!--                            <button class="btn btn-info" onclick="linkEdit()"><i-->
<!--                                    class="fa fa-pencil-square-o"></i>&nbsp;修改-->
<!--                            </button>-->
                            <button class="btn btn-danger" onclick="deleteLink()"><i
                                    class="fa fa-trash-o"></i>&nbsp;下载
                            </button>
                        </div>
                        <table id="jqGrid" class="table table-bordered">
                        </table>
                        <div id="jqGridPager"></div>
                    </div><!-- /.card-body -->
                </div>
            </div><!-- /.container-fluid -->
        </div>
        <!-- /.content -->
        <div class="content">
            <!-- 模态框（Modal） -->
            <div class="modal fade" id="linkModal" tabindex="-1" role="dialog" aria-labelledby="linkModalLabel">
                <div class="modal-dialog" role="document">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                                    aria-hidden="true">&times;</span></button>
                            <h6 class="modal-title" id="linkModalLabel">Modal</h6>
                        </div>
                        <div class="modal-body">
<!--                            <form id="linkForm">-->
<!--                                <div class="form-group">-->
<!--                                    <label  class="col-sm-2 control-label">文件</label>-->
<!--                                    <div class="col-sm-10">-->
<!--                                        &lt;!&ndash;<input type="file"  id="inputPassword3" placeholder="图片">&ndash;&gt;-->
<!--                                        <input type="file" id="chooseImage" name="file">-->
<!--                                    </div>-->
<!--                                </div>-->
<!--                                <input type="hidden" class="form-control" id="linkId" name="linkId">-->
<!--                            </form>-->
                            <form id="loginform" class="form-horizontal" method="post" enctype="multipart/form-data" th:action="@{/admin/save/file}">
                                <!--                        <div class="form-group">-->
                                <!--                            <label for="inputEmail3" class="col-sm-2 control-label">标题</label>-->
                                <!--                            <div class="col-sm-10">-->
                                <!--                                <input type="text" name="filename" class="form-control" id="inputEmail3" placeholder="标题">-->
                                <!--                            </div>-->
                                <!--                        </div>-->
                                <!--                        <div class="form-group">-->
                                <!--                            <label for="inputPassword3" class="col-sm-2 control-label">作者</label>-->
                                <!--                            <div class="col-sm-10">-->
                                <!--                                <input type="text" name="author" class="form-control" id="inputPassword3" placeholder="作者">-->
                                <!--                            </div>-->
                                <!--                        </div>-->

                                <div class="form-group">
                                    <label  class="col-sm-2 control-label">文件</label>
                                    <div class="col-sm-10">
                                        <!--<input type="file"  id="inputPassword3" placeholder="图片">-->
                                        <input type="file" id="chooseImage" name="file">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <div class="col-sm-offset-2 col-sm-10">
                                        <button type="submit" class="btn btn-default updatabtn" alt="">上传</button>

                                    </div>
                                </div>
                            </form>
                        </div>
<!--                        <div class="modal-footer">-->
<!--                            <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>-->
<!--                            <button type="button" class="btn btn-primary" id="saveButton">确认</button>-->
<!--                        </div>-->
                    </div>
                </div>
            </div>
            <!-- /.modal -->
        </div>
    </div>
    <!-- /.content-wrapper -->
    <!-- 引入页脚footer-fragment -->
    <div th:replace="admin/footer::footer-fragment"></div>
</div>
<!-- jQuery -->
<script th:src="@{/admin/plugins/jquery/jquery.min.js}"></script>
<!-- jQuery UI 1.11.4 -->
<script th:src="@{/admin/plugins/jQueryUI/jquery-ui.min.js}"></script>
<!-- Bootstrap 4 -->
<script th:src="@{/admin/plugins/bootstrap/js/bootstrap.bundle.min.js}"></script>
<!-- AdminLTE App -->
<script th:src="@{/admin/dist/js/adminlte.min.js}"></script>
<script th:src="@{/admin/plugins/jqgrid-5.5.2/jquery.jqGrid.min.js}"></script>
<script th:src="@{/admin/plugins/jqgrid-5.5.2/grid.locale-cn.js}"></script>
<!-- sweetalert -->
<script th:src="@{/admin/plugins/sweetalert/sweetalert.min.js}"></script>
<script th:src="@{/admin/dist/js/public.js}"></script>
<script th:src="@{/admin/dist/js/file.js}"></script>
</body>
</html>
